fd8e114f26566dd8b38db11c8a07b7e11dd1069c,src/main/java/com/forweaver/controller/LectureController.java,LectureController,fileViewer,#HttpServletRequest#String#String#Model#,298

Before Change


			@PathVariable("commit") String commit,Model model) {
		
		Lecture lecture = lectureService.get(lectureName);		
		String filePath = request.getRequestURI().substring(request.getRequestURI().indexOf("filepath:")+9);
		commit = commit.replace(",", ".");
		model.addAttribute("lecture", lecture);
		GitFileInfo gitFileInfo = gitService.getFileInfo(lectureName, "example", commit, filePath);

After Change


	@RequestMapping("/{lectureName}/example/commit:{commit}/**")
	public String fileViewer(HttpServletRequest request,@PathVariable("lectureName") String lectureName,
			@PathVariable("commit") String commit,Model model) {
		String uri = request.getRequestURI();
		commit = uri.substring(uri.indexOf("/commit:")+8);
		commit = commit.substring(0, commit.indexOf("/"));
		
		Lecture lecture = lectureService.get(lectureName);		
		String filePath = uri.substring(uri.indexOf("filepath:")+9);